namespace DotNetDalTest.AbstractEntities
{
    using System;
    using System.Collections.Generic;
    using System.Data.SqlClient;
    using DotNetDal.Core;
    using DotNetDal.Core.Data;
    using DotNetDal.Core.StructureAttributes;


    [TableAttribute(Schema = "Person")]
    public partial class AbstractAddress : DALTable
    {

        private static Entities.Address instance = new Entities.Address();

        [FieldAttribute(IsPrimaryKey = true)]
        public int AddressID
        {
            get
            {
                return ((int)(this["AddressID"]));
            }
            set
            {
                this["AddressID"] = value;
            }
        }

        [FieldAttribute()]
        public string AddressLine1
        {
            get
            {
                return ((string)(this["AddressLine1"]));
            }
            set
            {
                this["AddressLine1"] = value;
            }
        }

        [FieldAttribute(IsNullable = true)]
        public string AddressLine2
        {
            get
            {
                return ((string)(this["AddressLine2"]));
            }
            set
            {
                this["AddressLine2"] = value;
            }
        }

        [FieldAttribute()]
        public string City
        {
            get
            {
                return ((string)(this["City"]));
            }
            set
            {
                this["City"] = value;
            }
        }

        [FieldAttribute()]
        public int StateProvinceID
        {
            get
            {
                return ((int)(this["StateProvinceID"]));
            }
            set
            {
                this["StateProvinceID"] = value;
            }
        }

        [FieldAttribute()]
        public string PostalCode
        {
            get
            {
                return ((string)(this["PostalCode"]));
            }
            set
            {
                this["PostalCode"] = value;
            }
        }

        [FieldAttribute()]
        public System.Guid rowguid
        {
            get
            {
                return ((System.Guid)(this["rowguid"]));
            }
            set
            {
                this["rowguid"] = value;
            }
        }

        [FieldAttribute()]
        public System.DateTime ModifiedDate
        {
            get
            {
                return ((System.DateTime)(this["ModifiedDate"]));
            }
            set
            {
                this["ModifiedDate"] = value;
            }
        }

        public static Entities.Address[] GetFromSql(string sql)
        {
            return DALRecord.GetFromSql<Entities.Address>(sql);
        }

        public static Entities.Address[] GetFromSql(string sql, params SqlParameter[] sqlParams)
        {
            return DALRecord.GetFromSql<Entities.Address>(sql, sqlParams);
        }
    }
}
